package com.lody.virtual.client.hook.proxies.connectivity;

import android.content.Context;
import android.net.NetworkRequest;
import android.util.Log;

import com.lody.virtual.client.hook.base.BinderInvocationProxy;
import com.lody.virtual.client.hook.base.StaticMethodProxy;
import java.lang.reflect.Method;
import java.net.InetAddress;

import mirror.android.net.IConnectivityManager;

/**
 * @author legency
 */
public class ConnectivityStub extends BinderInvocationProxy {

    public ConnectivityStub() {
        super(IConnectivityManager.Stub.asInterface, Context.CONNECTIVITY_SERVICE);
    }

    @Override
    protected void onBindMethods() {
        super.onBindMethods();
//        addMethodProxy(new StaticMethodProxy("getActiveNetworkInfo"){
//            @Override
//            public Object call(Object who, Method method, Object... args) throws Throwable {
//                Object _infos = method.invoke(who,args);
//                return _infos;
//            }
//
//            @Override
//            public boolean beforeCall(Object who, Method method, Object... args) {
//                Log.e("ZXY","getFilteredNetworkState->beforeCall");
//                return super.beforeCall(who, method, args);
//            }
//
//            @Override
//            public Object afterCall(Object who, Method method, Object[] args, Object result) throws Throwable {
//                Log.e("ZXY","getFilteredNetworkState->afterCall");
//                return super.afterCall(who, method, args, result);
//            }
//        });
    }
}
